﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using Xiaov.SmartWeb.Application.SupCan;

namespace Xiaov.SmartWeb.Application.HXZB
{
    public partial class ZjtzData : System.Web.UI.Page
    {      
        protected void Page_Load(object sender, EventArgs e)
        {
            string nf = "";
            if (Request.QueryString["nf"] != null)
            {
                nf = Request.QueryString["nf"];
            }
            string dataString = ConfigurationManager.AppSettings["Zjtz_Column"];
            string sql = "select " + dataString + " from yt_zjtz where nf="
                + nf + " order by gqmc,jh";
            DataSet ds = Maticsoft.DBUtility.DbHelperOra.Query(sql);
            //if (ds != null && ds.Tables[0].Rows.Count > 0)
            //{
            //    ds.Tables[0].Columns.Add("xh", typeof(System.Int32));
            //    ds.Tables[0].Rows[0]["xh"] = 1;
            //    int xh = 1;
            //    for (int i = 1; i < ds.Tables[0].Rows.Count;i++ )
            //    {
            //        if (ds.Tables[0].Rows[i]["qk"].ToString() == ds.Tables[0].Rows[i - 1]["qk"].ToString())
            //        {
            //            xh++;
            //        }
            //        else
            //        {
            //            xh = 1;
            //        }
            //        ds.Tables[0].Rows[i]["xh"] = xh;
            //    }
            //}
            #region 输出xml串
            ConvertToXml.Convert(ds.Tables[0], dataString, 0, ds.Tables[0].Rows.Count);
            #endregion
        }
    }
}